<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr=["零","壹","貳","叁","肆","伍","陆","柒","捌","玖"];
    var danwei=["仟","佰","拾","圆"];

    function shuzi(number) {
        number = number + "";
        for (var i = 0; i < number.length; i++) {
            var x = number.substring(i, i + 1);
            document.write(arr[x] + danwei[i]);
        }
    }
    shuzi(4567)
</script>
</body>
</html>